/*
 *  data_structure/tree/huffman/main.c
 *
 *  (C) 2011 Harry Wei
 */

#include <stdio.h>
#include <error.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>

#include "huff.h"

int main(int argc, char **argv)
{
	int i;
	int frequency[LC_NODE_NUM + 1] = {0, 5, 7, 3, 2, 8};
	struct huffman huff[NODE_NUM + 1];

	if (creat_huffman(huff, frequency))
		return 1;

#if DEBUG == 1
	for (i = 1; i < NODE_NUM + 1; i++) {
		printf("%d %d %d %d\n", huff[i].weight, huff[i].parent, 
					huff[i].lchild, huff[i].rchild);
	}
#endif

	return 0;
}
